<?php

namespace app\admin\controller;

use app\common\controller\Backend;

/**
 * 控制台
 *
 * @icon fa fa-dashboard
 * @remark 用于展示当前系统中的统计数据、统计报表及重要实时数据
 */
class Dashboard extends Backend
{

    /**
     * 查看
     */
    public function index()
    {
        $Dash=new Dash();
        $data=[
            ['num'=>$Dash->today_users(),'name'=>__('Today users'),'color'=>'st-red'],
            ['num'=>$Dash->effec_users(),'name'=>__('Effec users'),'color'=>'st-green'],
            ['num'=>$Dash->total_users(),'name'=>__('Total users'),'color'=>'st-violet'],
            ['num'=>$Dash->users(),'name'=>__('Users'),'color'=>'st-blue'],
            ['num'=>$Dash->vip_users(),'name'=>__('Vip users'),'color'=>'st-red'],
            ['num'=>$Dash->vip_super_users(),'name'=>__('Vip super users'),'color'=>'st-green'],
            ['num'=>$Dash->today_orders(),'name'=>__('Today orders'),'color'=>'st-violet'],
            ['num'=>$Dash->users_balance(),'name'=>__('Users balance'),'color'=>'st-blue'],
            ['num'=>$Dash->today_orders_money(),'name'=>__('Today orders money'),'color'=>'st-red'],
            ['num'=>$Dash->today_return_cash(),'name'=>__('Today return cash'),'color'=>'st-green'],
        ];
        $this->view->assign('data',$data);

        return $this->view->fetch();
    }

}
